package com.lkj.controller;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/jj")
public class IndexContrller {

    @RequestMapping(value = "/index",method = RequestMethod.GET)
    @ResponseBody
    public String showIndex(){

        return "index";
    }

    @RequestMapping(value = "/view",method = RequestMethod.GET)
    public ModelAndView view(HttpServletRequest request, HttpServletResponse response){

        return new ModelAndView("index");
    }

    @RequestMapping("/home")
    public String home(){

        return "home";
    }
}
